package com.hsck.order.kds.setup.adapter

import android.view.View
import androidx.annotation.LayoutRes
import com.hsck.order.kds.base.common.BaseAdapter
import com.hsck.order.kds.base.common.BaseViewHolder
import kotlinx.android.synthetic.main.item_keyboard.view.*

class KeyboardAdapter(@LayoutRes layoutId: Int) : BaseAdapter<String>(layoutId) {


    override fun onBindViewHolder(holder: BaseViewHolder, data: String) {
        holder.itemView.tv_item_keyboard.text = data
        if (data == "删除") {
            holder.itemView.tv_item_keyboard.visibility = View.GONE
            holder.itemView.img_item_keyboard.visibility = View.VISIBLE
        } else {
            holder.itemView.tv_item_keyboard.visibility = View.VISIBLE
            holder.itemView.img_item_keyboard.visibility = View.GONE
        }
    }
}